package hu.debrecen.adastra.card.service.domain;

public class HungarianCard implements Card {

	public enum Type {
		VII, VIII, IX, X, UNDER, OVER, KING, ACE
	}

	public enum Suit {
		HEARTS, BELLS, ACORNS, GREEN
	}

	private Type type;

	private Suit suit;

	public HungarianCard() {
		super();
	}

	public HungarianCard(Type type, Suit suit) {
		super();
		this.type = type;
		this.suit = suit;
	}

	public HungarianCard(Suit suit, Type type) {
		super();
		this.type = type;
		this.suit = suit;
	}
	
	public String getType() {
		return type.name();
	}

	public void setType(Type type) {
		this.type = type;
	}

	public String getSuit() {
		return suit.name();
	}

	public void setSuit(Suit suit) {
		this.suit = suit;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((suit == null) ? 0 : suit.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		HungarianCard other = (HungarianCard) obj;
		if (suit != other.suit)
			return false;
		if (type != other.type)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "HungarianCard [" + suit + " - " + type + "]";
	}
	
	

}
